
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link href="/style/basic_layout.css" rel="stylesheet" type="text/css">
    <link href="/style/common_style.css" rel="stylesheet" type="text/css">
    <script type="text/javascript" src="/js/jquery/jquery.js"></script>
    <script type="text/javascript" src="/js/commonAll.js"></script>
    <script type="text/javascript" src="/js/plugins/artDialog/jquery.artDialog.js?skin=blue"></script>
    <title>WMS-演示版</title>
    <style>
        .alt td{ background:black !important;}
    </style>
</head>
<body>

<form id="searchForm" action="/productStock/list.do" method="post">
    <div id="container">
        <div class="ui_content">
            <div class="ui_text_indent">
                <div id="box_border">
                    <div id="box_top">搜索</div>
                    <div id="box_center">
                        商品名称/编码
                        <input type="text" class="ui_input_txt02" name="keyword" value="${qo.keyword}" />
                        所属仓库
                        <select class="ui_select01 btn_depot" name="depotId">
                            <option value=-1>---请选择---</option>
                            <c:forEach items="${depots}" var="d">

                                <option value=${d.id}>${d.name}</option>
                            </c:forEach>
                            <script>$("select[name='depotId'] option[value=${qo.depotId}]").prop("selected",true)</script>
                        </select>
                        品牌

                        <select class="ui_select01 btn_depot" name="brandId">
                            <option value=-1>---请选择---</option>
                            <c:forEach items="${brands}" var="d">

                                <option value=${d.id}>${d.name}</option>
                            </c:forEach>

                            <script>$("select[name='brandId'] option[value=${qo.brandId}]").prop("selected",true)</script>
                        </select>
                        <script>
                            $(".btn_depot").change(function () {
                            $("#searchForm").submit()
                        })</script>

                        库存阈值
                        <input type="number" class="ui_input_txt01" name="warnNum" value="${qo.warnNum}" />
                    </div>
                    <div id="box_bottom">
                        <input type="button" value="查询" class="ui_input_btn01 btn_page" data-page="1"/>

                    </div>
                </div>
            </div>
        </div>
        <div class="ui_content">
            <div class="ui_tb">
                <table class="table" cellspacing="0" cellpadding="0" width="100%" align="center" border="0">
                    <tr>
                        <th>仓库</th>
                        <th>商品编号</th>
                        <th>商品名称</th>
                        <th>商品品牌</th>
                        <th>库存价格</th>
                        <th>库存数量</th>
                        <th>总价值</th>
                    </tr>
                <c:forEach items="${result.data}" var="entity" varStatus="num">
                    <tr>

                        <td>${entity.depot.name}</td>
                        <td>${entity.product.sn}</td>
                        <td>${entity.product.name}</td>
                        <td>${entity.product.brand.name}</td>
                        <td>${entity.price}</td>
                        <td>${entity.storeNumber}</td>
                        <td>${entity.amount}</td>

                    </tr>
                </c:forEach>
                </table>
            </div>
            <div class="ui_tb_h30">
                <div class="ui_flt" style="height: 30px; line-height: 30px;">
                    共有
                    <span class="ui_txt_bold04">${result.rows}</span>
                    条记录，当前第
                    <span class="ui_txt_bold04">${result.currentPage}/${result.endPage}</span>
                    页
                </div>
                <div class="ui_frt">
                    <input type="button" value="首页" class="ui_input_btn01 btn_page" data-page="1"/>
                    <input type="button" value="上一页" class="ui_input_btn01 btn_page" data-page="${result.prevPage}"/>
                    <input type="button" value="下一页" class="ui_input_btn01 btn_page" data-page="${result.nextPage}"/>
                    <input type="button" value="尾页" class="ui_input_btn01 btn_page" data-page="${result.endPage}"/>

                    <select name="pageSize" class="ui_select02">
                        <option value="5">5</option>
                        <option value="10">10</option>
                        <option value="15">15</option>
                    </select>
                    <script>$("select[name='pageSize'] option[value='${result.pageSize}']").prop("selected",true)</script>


                    转到第<input type="text" name="currentPage" value="${result.currentPage}" class="ui_input_txt01" />页
                    <input type="button" class="ui_input_btn01 btn_page" value="跳转"/>
                </div>
            </div>
        </div>
    </div>
</form>
</body>
</html>

